from django import forms

class UploadFileForm(forms.Form):
    password = forms.CharField(
        label=u'密码',
        min_length=4,
        max_length=256,
        widget=forms.TextInput(attrs={'class': 'form-control','onblur':'formcheck()'}),
        error_messages={'required': u'不能为空哦', 'min_length': u'长度不能小于4位哦'},)


    file = forms.FileField(
        label=u'上传txt文档',
    )


class Getid(forms.Form):
    id =forms.IntegerField(
        label=u'商品id',
        # initial="张三", # 设置默认值
        # max_length = 20,
        widget=forms.TextInput(attrs={'id':'getid','class': 'form-control','onblur':'formcheck()'}),
        error_messages={'required': u'不能为空哦', 'min_length': u'长度不能小于4位哦'},
    )
